/*
********************************************************************************
* Copyright (C) 2022, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : part_gpu.cc
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2022-03-06 version v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
                Compile command: make
********************************************************************************
*/

#include <stdio.h>
#include "part_gpu.h"
#include "visitor_base.h"

using namespace std;

#define GPU_LOGE(fmt, args...) printf("%d Gpu E: " fmt, __LINE__, ##args)

CPartGpu::CPartGpu(std::string name, int driver, int function)
    : mName(name), mDriver(driver), mFunction(function)
{

}

CPartGpu::~CPartGpu()
{

}

std::string CPartGpu::GetName()
{
    return mName;
}

int CPartGpu::CheckDriver()
{
    return mDriver;
}

int CPartGpu::CheckFunction()
{
    return mFunction;
}

void CPartGpu::Accept(CVisitorBase *visitor)
{
    if (NULL != visitor) {
        visitor->VisitGpu(this);
    } else {
        GPU_LOGE("visitor is NULL!\n");
    }
}


